import request from "@/utils/request";

const VISITOR_BASE_URL = "/visitor";

/**
 * 获取日志分页列表
 *
 * @param queryParams 查询参数
 */
export function getPage(queryParams) {
  return request({
    url: `${VISITOR_BASE_URL}/page`,
    method: "get",
    params: queryParams,
  });
}

export function deleteBind(visitorId) {
  return request({
    url: `${VISITOR_BASE_URL}/delete/bind/`+visitorId,
    method: "put",
  });
}

/**
 * 获取访问趋势
 *
 * @param queryParams
 * @returns
 */
export function getVisitTrend(queryParams) {
  return request({
    url: `${VISITOR_BASE_URL}/visit-trend`,
    method: "get",
    params: queryParams,
  });
}

/**
 * 获取访问趋势
 *
 * @param queryParams
 * @returns
 */
export function getVisitStats() {
  return request({
    url: `${VISITOR_BASE_URL}/visit-stats`,
    method: "get",
  });
}
